﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page pageEncoding="UTF-8" contentType="text/html; UTF-8" isELIgnored="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Insert title here</title>
	<link type="text/css" rel="stylesheet" href="css/style.css">
	<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript">
		function update() {
			var customerID = ${customer.customerID};
			window.location.href = '${pageContext.request.contextPath}/customer/updateView?customerID='+customerID;
		}
		function deleteUser(){
			var customerID = ${customer.customerID};
			window.location.href = '${pageContext.request.contextPath}/customer/delete?customerID=' + customerID;
		}
	</script>
</head>
<body>
<c:if test="${not empty customer}">
	<div class="main">
		<div class="optitle clearfix">
			<div class="title">
				<h2>客户管理&gt;&gt;</h2>
			</div>
		</div>
		<div class="content">
			<table class="box">
				<tbody>
				<tr>
					<td class="field">客户编号：</td>
					<td>${customer.customerID}<input type="hidden" id="customerID" value="${customer.customerID}"></td>
				</tr>
				<tr>
					<td class="field">客户姓名：</td>
					<td>${customer.customerName}</td>
				</tr>
				<tr>
					<td class="field">联系电话：</td>
					<td>${customer.customerPhone}</td>
				</tr>
				<tr>
					<td class="field">会员级别：</td>
					<td>${customer.membershipLevel}</td>
				</tr>
				<tr>
					<td class="field">入会时间：</td>
					<%--<td>${customer.registerDate}</td>--%>
					<td>${date}</td>
				</tr>
				</tbody>
			</table>
		</div>
		<div class="buttons">
			<input type="button" id="update" value="修改" class="input-button" onclick="update()">
			<input type="button" id="del" value="删除" class="input-button" onclick="deleteUser()">
			<input type="button" id="backButton" onclick="history.back(-1)" value="返回" class="input-button">
		</div>
	</div>
</c:if>
<script type="text/javascript" src="../js/user/view.js"></script>
</body>
</html>